﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// TieuChuanDinhDuong Repository. Good example of CRUD operations.
    ///// </summary>
    public class TieuChuanDinhDuongRepository : ITieuChuanDinhDuongRepository
    {
        private static readonly ITieuChuanDinhDuongDao _tieuChuanDinhDuong = DataAccess.TieuChuanDinhDuongDao;
        public List<TieuChuanDinhDuong> GetList()
        {
            return _tieuChuanDinhDuong.GetTieuChuanDinhDuong().ToList();
        }

        public TieuChuanDinhDuong Get(string id)
        {
            return _tieuChuanDinhDuong.GetTieuChuanDinhDuongByID(id);
        }

        public void Insert(TieuChuanDinhDuong t)
        {
            _tieuChuanDinhDuong.InsertTieuChuanDinhDuong(t);
        }

        public void Update(TieuChuanDinhDuong t)
        {
            _tieuChuanDinhDuong.UpdateTieuChuanDinhDuong(t);
        }

        public void Delete(TieuChuanDinhDuong t)
        {
            _tieuChuanDinhDuong.DeleteTieuChuanDinhDuong(t);
        }
    }
}